<!--
 * @Author: your name
 * @Date: 2021-10-19 14:13:53
 * @LastEditTime: 2021-10-19 14:38:20
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /a1902-a-group/vue_router/src/views/Login/index.vue
-->
<template>
  <div>
      <input type="text" name="" id="">
      <input type="text" name="" id="">
      <button @click="logins">按钮</button>
  </div>
</template>

<script>
import {myLogin} from '../../api/login'
import {useStore} from 'vuex'
import {reactive} from 'vue'
export default {
    setup() {
        const user = reactive({
            username: '123',
            password: '123'
        })

        const store = useStore();

        const logins = () => {
            store.dispatch('LOGIN', user);
        }

        return {
            logins
        }
    }
}
</script>

<style>

</style>